package edu.bluebeanforum.model;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
@Api("文章信息")
@Data
public class Article {
    private Long id;

    @ApiModelProperty("板块id")
    private Long boardId;

    private Long userId;

    private String title;

    private Integer visitCount;

    private Integer replyCount;

    private Integer likeCount;

    private Byte state;

    private Byte deleteState;

    private Date createTime;

    private Date updateTime;

    private String content;


    //
    @ApiModelProperty("是否作者")
    private Boolean own;//为什么是使用包装类不使用布尔类型呢？因为为布尔类型时，own为默认false  会被序列化后展示到前端返回结果，如果设置为包装类，默认为null，则不会被序列化
//    关联对象———用户
    private User user;
//    关联对象——板块
    private Board board;
}